home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 127 / PC Guia 127.iso / Software / Utils / GParted Live CD / Bin / gparted-livecd-0.2.2.iso / usr_sqfs / bin / rlogin-cwd < prev    next >
Encoding:
Text File  |  2005-07-18  |  415 b   |  17 lines

  1. #!/bin/sh
  2. # \
  3. exec expect -- "$0" ${1+"$@"}
  4. # rlogin-cwd - rlogin but with same directory
  5. #
  6. # You can extend this idea to save any arbitrary information across rlogin
  7. # Don Libes -  Oct 17, 1991.
  8.  
  9. set prompt "(%|#|\\$) $"        ;# default prompt
  10. catch {set prompt $env(EXPECT_PROMPT)}
  11.  
  12. eval spawn rlogin $argv
  13. set timeout 60
  14. expect eof exit timeout {send_user "timed out\n"; exit} -re $prompt
  15. send "cd [pwd]\r"
  16. interact
  17.